package com.bwie.system.controller;

import com.bwie.common.domain.Type;
import com.bwie.common.result.Result;
import com.bwie.system.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @className: TypeController
 * @Description: TODO
 * @version: v1.８.0
 * @author:
 * @date:
 */
@RestController
public class TypeController {
    @Autowired
    private TypeService typeService;

    @GetMapping("/typeList")
    public Result<List<Type>> typeList(){
        List<Type> types = typeService.typeList();
        return Result.success(types);
    }
}
